/**
 * @license
 * Cesium - https://github.com/CesiumGS/cesium
 * Version 1.99
 *
 * Copyright 2011-2022 Cesium Contributors
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 *
 * Columbus View (Pat. Pend.)
 *
 * Portions licensed separately.
 * See https://github.com/CesiumGS/cesium/blob/main/LICENSE.md for full licensing details.
 */
define(["./createTaskProcessorWorker-86855e0c","./Resource-6497b328","./Cache","./defer-fe5560c8","./UPNG","./JPG","./PixelFormat-b58cbd11","./defaultValue-96fcdfd6","./defined-841154bc","./combine-43f74aba","./Math-65e8389d","./RuntimeError-5ad5d372","./LinkedQueue","./WebGLConstants-fcb70ee3"],(function(e,r,t,o,i,n,f,a,u,l,s,c,d,h){"use strict";return new t(1e5),e.createTaskProcessorWorker((function(e,t){if(1==e.init)return void function(e){let r=o.defer();e.tileSize,r.resolve({}),r.promise}(e);var a=e.url,u=new r.Resource({url:a});u.request.throttle=!1,u.request.throttleByServer=!0,u.request.type=1;var l=u.fetchArrayBuffer();if(!l)return!0;let s=o.defer();return l.then((function(r){if(!r)return void s.resolve({});let o,a,u=new Uint8Array(r);if(i.isPNG(u)){a=f.PixelFormat.RGBA;let t=i.decode(r);o=i.toRGBA8(t)[0];let n=Number(e.alpha);if(1!=n){let e=new Uint8Array(o);for(let r=0;r<e.length;r++)(r+1)%4==0&&(e[r]=Math.floor(255*n));o=e.buffer}}else{a=f.PixelFormat.RGB;let e=new n;e.parse(u),o=e.getData(e.width,e.height).buffer}t.push(o),s.resolve({data:o,pixelFormat:a})}),(function(e){s.reject(e)})),s.promise}))}));
